package net.lainiao.other.demo1;

import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2017/3/13.
 */
public class AddTask implements Runnable {
    private TestVolatile testVolatile;
    public AddTask(TestVolatile testVolatile){
        this.testVolatile=testVolatile;
    }
    @Override
    public void run() {
        testVolatile.add();
        try {
            TimeUnit.MILLISECONDS.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
